package com.hnjz.bkd;

import java.util.List;

import org.apache.commons.lang.StringUtils;
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hnjz.sys.function.Function;

@Service("bkdRyxxManager")
public class BkdRyxxManager {
	
	@Autowired
	private BkdRyxxMapper  bkdRyxxMapper;
	
    public JSONArray queryBkdRyxx(String name) throws Exception {
        JSONArray re = new JSONArray();
        BkdRyxx ryxx = new BkdRyxx();
        ryxx.setXm(name);
      /*  List<BkdRyxx> rys = bkdRyxxMapper.findByName(ryxx);
        JSONObject jsonObj = null;
        for (BkdRyxx ry : rys) {
            jsonObj = new JSONObject();
            jsonObj.put("id", ele.getId());
            if (StringUtils.isBlank(name) && StringUtils.isNotBlank(ele.getParent())) {
                jsonObj.put("pid", ele.getParent());
            }
            jsonObj.put("name", ele.getFuncName());
            JSONObject dataObject = new JSONObject();
            dataObject.put("title", ele.getFuncName());
            dataObject.put("note", ele.getFuncDesc());
            dataObject.put("link", ele.getLinkaddr());
            dataObject.put("order", ele.getOrderby());
            jsonObj.put("dataObject", dataObject);
            re.put(jsonObj);
        }*/
        return re;
    }

}
